﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace UsedBookTradeSystem.Migrations
{
    /// <inheritdoc />
    public partial class v101 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<bool>(
                name: "IsDeleted",
                table: "Users",
                type: "tinyint(1)",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "IsDeleted",
                table: "BookCategories",
                type: "tinyint(1)",
                nullable: true);

            migrationBuilder.UpdateData(
                table: "BookCategories",
                keyColumn: "Id",
                keyValue: 1,
                column: "IsDeleted",
                value: false);

            migrationBuilder.UpdateData(
                table: "Users",
                keyColumn: "Id",
                keyValue: 1,
                columns: new[] { "CreatedTime", "IsDeleted" },
                values: new object[] { new DateTime(2024, 4, 4, 20, 5, 46, 664, DateTimeKind.Local).AddTicks(5683), false });

            migrationBuilder.UpdateData(
                table: "Users",
                keyColumn: "Id",
                keyValue: 2,
                columns: new[] { "CreatedTime", "IsDeleted" },
                values: new object[] { new DateTime(2024, 4, 4, 20, 5, 46, 664, DateTimeKind.Local).AddTicks(5961), false });
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "IsDeleted",
                table: "Users");

            migrationBuilder.DropColumn(
                name: "IsDeleted",
                table: "BookCategories");

            migrationBuilder.UpdateData(
                table: "Users",
                keyColumn: "Id",
                keyValue: 1,
                column: "CreatedTime",
                value: new DateTime(2024, 4, 4, 13, 31, 8, 600, DateTimeKind.Local).AddTicks(8295));

            migrationBuilder.UpdateData(
                table: "Users",
                keyColumn: "Id",
                keyValue: 2,
                column: "CreatedTime",
                value: new DateTime(2024, 4, 4, 13, 31, 8, 600, DateTimeKind.Local).AddTicks(8579));
        }
    }
}
